package org.example.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.example.entity.Image;

import java.util.List;

public interface ImageMapper {
    @Select("SELECT * FROM images")
    List<Image> getAll();
    @Select("SELECT * FROM images WHERE id = #{id}")
    Image getOne(Integer id);
    @Insert("INSERT INTO Image (description,imgeUrl) VALUES (#{description},#{imageUrl})")
    Integer insert(Image image);

}
